74d21b3ebc4c784f423fcac23c9c4b7ac8571471,doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoSink.java,FoSink,comment,#String#,1371
Before Change
}
String msg = "Modified invalid comment: '" + originalComment + "' to '" + comment + "'";
logMessage( "modifyComment", msg );
}
StringBuilder buf = new StringBuilder( comment.length() + 7 );
After Change
/** {@inheritDoc} */
public void comment( String comment )
{
if ( comment != null )
{
final String originalComment = comment;
// http://www.w3.org/TR/2000/REC-xml-20001006#sec-comments
while ( comment.contains( "--" ) )
{
comment = comment.replace( "--", "- -" );
}
if ( comment.endsWith( "-" ) )
{
comment += " ";
}
if ( !originalComment.equals( comment ) )
{
String msg = "Modified invalid comment: '" + originalComment + "' to '" + comment + "'";
logMessage( "modifyComment", msg );
}
final StringBuilder buffer = new StringBuilder( comment.length() + 7 );